package com.labofjet.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.labofjet.entity.House;
import com.labofjet.entity.Student;
import com.labofjet.repository.module2.HouseRepository;

@Service
public class TestTransactionService2 {
    @Autowired
    private HouseRepository repository;

    @Transactional(propagation = Propagation.NESTED)
    public void operate2() {
        House s = new House();
        s.setName("842o2");
        repository.save(s);
        //throw new RuntimeException();
    }
}
